package com.jl.enums;

public enum OperateType {
    type1("1","兑换"),
    type2("2","代理提现"),
    type3("3","赠送");

    private String id;
    private String desc;

    OperateType(String id, String desc) {
        this.id = id;
        this.desc = desc;
    }

    public static String getDescById(String id){
        OperateType[] values = OperateType.values();
        for (OperateType value : values) {
            if (id.equals(value.getId())){
                return value.getDesc();
            }
        }
        return null;
    }

    public String getId() {
        return id;
    }

    public String getDesc() {
        return desc;
    }
}
